ignorePortInHostMatching: true
name: sample-gateway:HTTP:8080:*
requestHeadersToRemove:
- x-kuma-tags
validateClusters: false
virtualHosts:
- domains:
  - '*'
  name: '*'
  routes:
  - match:
      path: /
    route:
      clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
      idleTimeout: 5s
      retryPolicy:
        hostSelectionRetryMaxAttempts: "2"
        numRetries: 1
        perTryTimeout: 2s
        rateLimitedRetryBackOff:
          maxInterval: 5s
          resetHeaders:
          - name: retry-after-http
          - format: UNIX_TIMESTAMP
            name: x-retry-after-http
        retriableHeaders:
        - name: x-retry-regex
          stringMatch:
            safeRegex:
              googleRe2: {}
              regex: .*
        - name: x-retry-exact
          stringMatch:
            exact: exact-value
        retriableRequestHeaders:
        - name: :method
          stringMatch:
            exact: CONNECT
        - name: :method
          stringMatch:
            exact: DELETE
        - name: :method
          stringMatch:
            exact: GET
        - name: :method
          stringMatch:
            exact: HEAD
        - name: :method
          stringMatch:
            exact: OPTIONS
        - name: :method
          stringMatch:
            exact: PATCH
        - name: :method
          stringMatch:
            exact: POST
        - name: :method
          stringMatch:
            exact: PUT
        - name: :method
          stringMatch:
            exact: TRACE
        - name: x-retry-prefix
          stringMatch:
            prefix: prefix-
        retriableStatusCodes:
        - 429
        retryBackOff:
          baseInterval: 3s
          maxInterval: 4s
        retryHostPredicate:
        - name: envoy.retry_host_predicates.previous_hosts
          typedConfig:
            '@type': type.googleapis.com/envoy.extensions.retry.host.previous_hosts.v3.PreviousHostsPredicate
        - name: envoy.retry_host_predicates.omit_host_metadata
          typedConfig:
            '@type': type.googleapis.com/envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig
            metadataMatch:
              filterMetadata:
                envoy.lb:
                  test: test
        retryOn: 5xx,gateway-error,reset,retriable-4xx,connect-failure,envoy-ratelimited,refused-stream,http3-post-connect-failure,retriable-status-codes
        retryPriority:
          name: envoy.retry_priorities.previous_priorities
          typedConfig:
            '@type': type.googleapis.com/envoy.extensions.retry.priority.previous_priorities.v3.PreviousPrioritiesConfig
            updateFrequency: 2
      weightedClusters:
        clusters:
        - name: backend-26cb64fa4e85e7b7
          requestHeadersToAdd:
          - header:
              key: x-kuma-tags
              value: '&kuma.io/service=sample-gateway&'
          weight: 1
